#!/bin/bash

DSTROOT=$1
INSTALL_PATH="Library/InputManagers/WebHUD"

test -d "$DSTROOT/$INSTALL_PATH" || {
	echo "does'nt exist: $DSTROOT/$INSTALL_PATH";
	exit 10;
}

echo "Fixing permissions on $DSTROOT/$INSTALL_PATH ..."
test -z "$DSTROOT" || {
  echo "fixing perms of $DSTROOT/Library"
	chmod 1775 "$DSTROOT/Library"
	chown -R root:admin "$DSTROOT/Library"
}
chmod -R 0755 "$DSTROOT/$INSTALL_PATH"

